package com.tpu.osu.rating;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.tpu.osu.rating.service.VoteService;

public class Start
{

    public static void main(String[] aArgs) throws Exception
    {

        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]
        { "com/tpu/osu/rating/spring/rating.xml" });

        VoteService service = (VoteService) ctx.getBean("voteService");

        Vote vote = new Vote();
        vote.setComments("YO!");
        vote.setAllocates_main(10);
        vote.setArrangement(7);
        vote.setPin("xxx");
        vote.setLector("MOKINA");

        service.create(vote);

        System.out.println("vote 1 OK");

        service.create(vote);

        System.out.println("vote 2 OK");

    }

}
